<?php
class Application_Form_Conta extends Zend_Form
{
	public function init()
	{
		$id = new Zend_Form_Element_Hidden('id_contas');
		
		
		$data = new Zend_Form_Element_Select('id_dia');
		$data->setLabel('Data: ');
		
		// Search all Species
		$mdlDias = new Application_Model_Dia();
		$recordSet = $mdlDias->selectAll(true);
		
		$data->addMultiOption('', '');
		// Add Combo
		foreach($recordSet as $key => $value)
		{
			$data->addMultiOption($value['id_dia'], $value['dia']);
		}
		
		
		
		$valor = new Zend_Form_Element_Text('valor');
		$valor->setLabel('Valor da Conta: ');
		
		
		
		$tipoConta = new Zend_Form_Element_Select('id_tipo_contas');
		$tipoConta->setLabel('Tipo da Conta: ');
			
		// Search all Species
		$mdlTipoContas = new Application_Model_TipoConta();
		$recordSet = $mdlTipoContas->selectAll();
		
		$tipoConta->addMultiOption('', '');
		// Add Combo
		foreach($recordSet as $key => $value)
		{
			$tipoConta->addMultiOption($value['id_tipo_contas'], $value['descricao']);
		}
			
		$submit = new Zend_Form_Element_Submit('Salvar');
		
		$this->addElements(array($id,$data,$valor,$tipoConta,$submit));
	}
}